<html>
<head><meta charset="utf-8"><title>meeting 2021-05-04 · project-const-generics · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/index.html">project-const-generics</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html">meeting 2021-05-04</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="237331147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237331147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237331147">(May 04 2021 at 14:11)</a>:</h4>
<p>Meeting in 30 minutes</p>



<a name="237331988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237331988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237331988">(May 04 2021 at 14:17)</a>:</h4>
<p>I would like to (ab)use this meeting to quickly get some looks at <a href="https://github.com/rust-lang/rust/issues/84838">#84838</a> on whether the impl seems acceptable (with <code>marker_trait_attr</code> instead of the auto trait hack which doesn't work)</p>



<a name="237332049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237332049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237332049">(May 04 2021 at 14:17)</a>:</h4>
<p>apart from this we probably want to continue with the last meeting <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span> going to do some prep work now</p>



<a name="237336705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237336705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237336705">(May 04 2021 at 14:45)</a>:</h4>
<p><span class="user-group-mention" data-user-group-id="3805">@project-const-generics</span> is it time? it is time!</p>



<a name="237337046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237337046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237337046">(May 04 2021 at 14:47)</a>:</h4>
<p>wave</p>



<a name="237337140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237337140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237337140">(May 04 2021 at 14:48)</a>:</h4>
<p>I've been avoiding lookng at <a href="https://github.com/rust-lang/rust/issues/84838">#84838</a> :) let me take a look</p>



<a name="237337141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237337141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237337141">(May 04 2021 at 14:48)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> want to start by quickly looking at <a href="https://github.com/rust-lang/rust/issues/84838">#84838</a></p>



<a name="237337151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237337151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237337151">(May 04 2021 at 14:48)</a>:</h4>
<p>^^</p>



<a name="237337214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237337214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237337214">(May 04 2021 at 14:48)</a>:</h4>
<p>the description still mentions auto traits, but that won't work as we now know :p</p>



<a name="237337580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237337580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237337580">(May 04 2021 at 14:51)</a>:</h4>
<p>so...</p>



<a name="237337625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237337625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237337625">(May 04 2021 at 14:51)</a>:</h4>
<p>we're adding a kind of intrinsic <code>array_default_hack</code>?</p>



<a name="237337657"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237337657" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237337657">(May 04 2021 at 14:51)</a>:</h4>
<p>a lang item ^^ yeah</p>



<a name="237337703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237337703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237337703">(May 04 2021 at 14:51)</a>:</h4>
<p>why not just do...</p>



<a name="237337791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237337791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237337791">(May 04 2021 at 14:52)</a>:</h4>
<p>hmm, I have some mild concerns :)</p>



<a name="237337828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237337828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237337828">(May 04 2021 at 14:52)</a>:</h4>
<p>so, the idea here is ultimately to create a specialized version</p>



<a name="237337838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237337838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237337838">(May 04 2021 at 14:52)</a>:</h4>
<p>(right?)</p>



<a name="237337884"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237337884" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237337884">(May 04 2021 at 14:52)</a>:</h4>
<p>yes, specialize for <code>N != 0</code> / <code>T: Default</code></p>



<a name="237338780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237338780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237338780">(May 04 2021 at 14:56)</a>:</h4>
<p>ok so I'm thinking</p>



<a name="237338790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237338790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237338790">(May 04 2021 at 14:56)</a>:</h4>
<p>i was going to suggest doing something like</p>



<a name="237339012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237339012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237339012">(May 04 2021 at 14:57)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">impl</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">N</span>: <span class="kt">usize</span><span class="o">&gt;</span><span class="w"> </span><span class="n">ArrayDefaultHack</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">[</span><span class="n">T</span><span class="p">;</span><span class="w"> </span><span class="n">N</span><span class="p">]</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">make_me</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="nc">Self</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="n">N</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">[]</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="fm">panic!</span><span class="p">()</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">impl</span><span class="o">&lt;</span><span class="n">T</span>: <span class="nb">Default</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">N</span>: <span class="kt">usize</span><span class="o">&gt;</span><span class="w"> </span><span class="n">ArrayDefaultHack</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">[</span><span class="n">T</span><span class="p">;</span><span class="w"> </span><span class="n">N</span><span class="p">]</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">make_me</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="nc">Self</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">[();</span><span class="w"> </span><span class="n">N</span><span class="p">].</span><span class="n">map</span><span class="p">(</span><span class="o">..</span><span class="p">.)</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="237339144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237339144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237339144">(May 04 2021 at 14:58)</a>:</h4>
<p>although I guess you can even make it simpler</p>



<a name="237339239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237339239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237339239">(May 04 2021 at 14:58)</a>:</h4>
<p><em>but</em> I realized that this impl, in its full generality, doesn't match the "minimal specialization" I think we will eventually get</p>



<a name="237339322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237339322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237339322">(May 04 2021 at 14:59)</a>:</h4>
<p>which would work for any <code>T: Default</code> where the <code>Default</code> impl was lifetime-agnostic (which is probably all of them, but anyway)</p>



<a name="237339362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237339362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237339362">(May 04 2021 at 14:59)</a>:</h4>
<p>yeah, this doesn't work with <code>min_specialization</code></p>



<a name="237339392"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237339392" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237339392">(May 04 2021 at 14:59)</a>:</h4>
<p>so now I'm wondering about whether these two impls would ever be accepted</p>



<a name="237339455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237339455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237339455">(May 04 2021 at 15:00)</a>:</h4>
<p>plausibly</p>



<a name="237339542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237339542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237339542">(May 04 2021 at 15:00)</a>:</h4>
<p>intersection impls would presumably allow it</p>



<a name="237339847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237339847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237339847">(May 04 2021 at 15:00)</a>:</h4>
<p>it's definitely committing us to a more aggressive form of specialization</p>



<a name="237339887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237339887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237339887">(May 04 2021 at 15:01)</a>:</h4>
<p>but one I guess we probably want</p>



<a name="237339912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237339912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237339912">(May 04 2021 at 15:01)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/260443-project-const-generics/topic/meeting.202021-05-04/near/237339542">said</a>:</p>
<blockquote>
<p>intersection impls would presumably allow it</p>
</blockquote>
<p>these allow an impl for <code>T: TraitA</code> and <code>T: TraitB</code> if there's also an impl for the <code>T: TraitA + TraitB</code> case?</p>



<a name="237339971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237339971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237339971">(May 04 2021 at 15:01)</a>:</h4>
<p>that's the general idea</p>



<a name="237340012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237340012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237340012">(May 04 2021 at 15:01)</a>:</h4>
<p>there are other rules one might use---</p>



<a name="237340320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237340320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237340320">(May 04 2021 at 15:02)</a>:</h4>
<p>for example, in this case, if you consider only their intersection, one impl is a specialization of the other</p>



<a name="237340565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237340565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237340565">(May 04 2021 at 15:02)</a>:</h4>
<p>maybe we could use that to just use the <code>0</code> impl whenever it may apply</p>



<a name="237340626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237340626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237340626">(May 04 2021 at 15:03)</a>:</h4>
<p>I haven't thought hard about that</p>



<a name="237341042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237341042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237341042">(May 04 2021 at 15:04)</a>:</h4>
<p>ok well the PR itself I have no issue with, i think the question is how much we're willing to commit to specialization and its eventual capabilities; it's a topic I'd love to re-open (in principle)</p>



<a name="237341081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237341081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237341081">(May 04 2021 at 15:04)</a>:</h4>
<p>or at least i'd like to have more of a plan</p>



<a name="237341268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237341268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237341268">(May 04 2021 at 15:05)</a>:</h4>
<p>so I think that adding the generic array default impl is worth it, even if we had to permanently keep this lang item hack</p>



<a name="237341335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237341335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237341335">(May 04 2021 at 15:05)</a>:</h4>
<p>but also</p>



<a name="237341403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237341403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237341403">(May 04 2021 at 15:05)</a>:</h4>
<p><code>serde::Deserialize</code> has the same problem and can't use lang items</p>



<a name="237341435"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237341435" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237341435">(May 04 2021 at 15:05)</a>:</h4>
<p><a href="https://docs.serde.rs/serde/de/trait.Deserialize.html#impl-Deserialize%3C%27de%3E-for-%5BT%3B%200%5D">https://docs.serde.rs/serde/de/trait.Deserialize.html#impl-Deserialize%3C%27de%3E-for-%5BT%3B%200%5D</a></p>



<a name="237341514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237341514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237341514">(May 04 2021 at 15:05)</a>:</h4>
<p>so thinking about how we want to allow this in the long term is definitely worthwhile</p>



<a name="237341726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237341726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237341726">(May 04 2021 at 15:06)</a>:</h4>
<p>it seems like it is going to come up a lot</p>



<a name="237341858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237341858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237341858">(May 04 2021 at 15:07)</a>:</h4>
<p>it seems like something we could extend specialization to support without challenge</p>



<a name="237341905"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237341905" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237341905">(May 04 2021 at 15:07)</a>:</h4>
<p>yeah, and once the generic default impl exists people can go and ask why we don't have the same impls for <code>Clone</code> or <code>Copy</code> or whatever</p>



<a name="237342295"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237342295" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237342295">(May 04 2021 at 15:08)</a>:</h4>
<p>i'm trying to think how to formulate my instinct of what makes the <code>; 0</code> case "more specialized"</p>



<a name="237342438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237342438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237342438">(May 04 2021 at 15:08)</a>:</h4>
<p>it's clearly <em>not</em></p>



<a name="237342614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237342614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237342614">(May 04 2021 at 15:09)</a>:</h4>
<p>well ok, I guess it's soething like this</p>



<a name="237342889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237342889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237342889">(May 04 2021 at 15:10)</a>:</h4>
<p>ok so we have impl A = with default, impl B = zero length</p>



<a name="237343104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237343104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237343104">(May 04 2021 at 15:11)</a>:</h4>
<p>yeah. ok. I can't come up with a way to formulate it :)</p>



<a name="237343194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237343194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237343194">(May 04 2021 at 15:11)</a>:</h4>
<p>you can imagine various mechanisms, like the intersection impls i gave, althugh I remember disliking those</p>



<a name="237343253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237343253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237343253">(May 04 2021 at 15:12)</a>:</h4>
<p>I thnk if you combined them with crate prioritization</p>



<a name="237343260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237343260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237343260">(May 04 2021 at 15:12)</a>:</h4>
<p>I thought it was ok</p>



<a name="237343311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237343311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237343311">(May 04 2021 at 15:12)</a>:</h4>
<p>otherwise there were semver hazards</p>



<a name="237343383"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237343383" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237343383">(May 04 2021 at 15:12)</a>:</h4>
<p>e.g., intersection impls within a crate, and preferring downstream crates otherwise, something like that</p>



<a name="237343447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237343447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237343447">(May 04 2021 at 15:12)</a>:</h4>
<p>oh, there's that too, isn't there</p>



<a name="237343516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237343516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237343516">(May 04 2021 at 15:12)</a>:</h4>
<p>somebody could have implemented <code>impl Default for [MyType; $n]</code> already</p>



<a name="237343539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237343539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237343539">(May 04 2021 at 15:13)</a>:</h4>
<p>and <code>MyType: Default</code> may be true</p>



<a name="237343601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237343601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237343601">(May 04 2021 at 15:13)</a>:</h4>
<p>so, lacking specialization, this impl is a breaking change..?</p>



<a name="237343937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237343937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237343937">(May 04 2021 at 15:14)</a>:</h4>
<blockquote>
<p>only traits defined in the current crate can be implemented for arbitrary types</p>
</blockquote>



<a name="237343958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237343958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237343958">(May 04 2021 at 15:14)</a>:</h4>
<p>it luckily doesn't seem that way</p>



<a name="237343987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237343987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237343987">(May 04 2021 at 15:14)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="cp">#[derive(Default)]</span><span class="w"></span>
<span class="k">struct</span> <span class="nc">Defaulted</span><span class="p">;</span><span class="w"></span>

<span class="k">impl</span><span class="w"> </span><span class="nb">Default</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">[</span><span class="n">Defaulted</span><span class="p">;</span><span class="w"> </span><span class="mi">33</span><span class="p">]</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">default</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="nc">Self</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="fm">todo!</span><span class="p">()</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="237344070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237344070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237344070">(May 04 2021 at 15:15)</a>:</h4>
<p>ah, because don't we consider "array" to be fundamental I guess</p>



<a name="237344266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237344266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237344266">(May 04 2021 at 15:15)</a>:</h4>
<p>(do we want that once all array impls have the <code>0</code> special case?)</p>



<a name="237344416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237344416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237344416">(May 04 2021 at 15:16)</a>:</h4>
<p>i.e. once adding that special case is easier</p>



<a name="237344429"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237344429" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237344429">(May 04 2021 at 15:16)</a>:</h4>
<p>don't know. I have been wondering how much specialization changes the calculus</p>



<a name="237344473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237344473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237344473">(May 04 2021 at 15:16)</a>:</h4>
<p>my ideal is that we can loosen some of the prohibitions against adding blanket impls</p>



<a name="237344489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237344489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237344489">(May 04 2021 at 15:16)</a>:</h4>
<p>once we have specialization</p>



<a name="237344502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237344502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237344502">(May 04 2021 at 15:16)</a>:</h4>
<p>I forget if there are problems with this though</p>



<a name="237344598"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237344598" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237344598">(May 04 2021 at 15:17)</a>:</h4>
<p>so, I can try to write up a quick something for that PR based on this conversation-- I think there is a need for a "specialization design doc"... :)</p>



<a name="237344644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237344644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237344644">(May 04 2021 at 15:17)</a>:</h4>
<p>^^</p>



<a name="237344657"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237344657" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237344657">(May 04 2021 at 15:18)</a>:</h4>
<p>for that pr to land?</p>



<a name="237344687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237344687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237344687">(May 04 2021 at 15:18)</a>:</h4>
<p>or in general</p>



<a name="237344763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237344763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237344763">(May 04 2021 at 15:18)</a>:</h4>
<p>i intentionally avoided anything even remotely interacting with specialization, so that we don't have to deal with that yet</p>



<a name="237344797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237344797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237344797">(May 04 2021 at 15:18)</a>:</h4>
<p>well, you didn't really</p>



<a name="237344814"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237344814" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237344814">(May 04 2021 at 15:18)</a>:</h4>
<p>you just added a lang item to side-step it :)</p>



<a name="237344884"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237344884" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237344884">(May 04 2021 at 15:19)</a>:</h4>
<p>I meant "in general", not necessarily for that PR to land, althuogh it is definitely a commitment</p>



<a name="237345015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237345015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237345015">(May 04 2021 at 15:20)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/260443-project-const-generics/topic/meeting.202021-05-04/near/237344814">said</a>:</p>
<blockquote>
<p>you just added a lang item to side-step it :)</p>
</blockquote>
<p>exactly, now it does not depend on specialization :p</p>



<a name="237345099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237345099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237345099">(May 04 2021 at 15:20)</a>:</h4>
<p>ah wait</p>



<a name="237345198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237345198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237345198">(May 04 2021 at 15:21)</a>:</h4>
<p>there <em>is</em> a sense in which the <code>;0</code> impl is more specialized as well; it's <em>always applicable</em></p>



<a name="237345244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237345244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237345244">(May 04 2021 at 15:21)</a>:</h4>
<p>(in the technial sense I introduced in my blog post)</p>



<a name="237345329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237345329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237345329">(May 04 2021 at 15:22)</a>:</h4>
<p><a href="https://smallcultfollowing.com/babysteps/blog/2018/02/09/maximally-minimal-specialization-always-applicable-impls/">https://smallcultfollowing.com/babysteps/blog/2018/02/09/maximally-minimal-specialization-always-applicable-impls/</a>?</p>



<a name="237345334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237345334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237345334">(May 04 2021 at 15:22)</a>:</h4>
<p><a href="https://smallcultfollowing.com/babysteps/blog/2018/02/09/maximally-minimal-specialization-always-applicable-impls/#the-always-applicable-test">https://smallcultfollowing.com/babysteps/blog/2018/02/09/maximally-minimal-specialization-always-applicable-impls/#the-always-applicable-test</a></p>



<a name="237345443"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237345443" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237345443">(May 04 2021 at 15:22)</a>:</h4>
<p>the rule exactly as I wrote it doesn't apply</p>



<a name="237345465"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237345465" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237345465">(May 04 2021 at 15:23)</a>:</h4>
<p>anyway it's fine</p>



<a name="237345495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237345495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237345495">(May 04 2021 at 15:23)</a>:</h4>
<p>there are different ways to rationalize it</p>



<a name="237345563"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237345563" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237345563">(May 04 2021 at 15:23)</a>:</h4>
<p>you could also imagine a test like "some specific constant makes it more specific than 'any type meeting this trait'", but i'm not wild about that</p>



<a name="237345592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237345592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237345592">(May 04 2021 at 15:23)</a>:</h4>
<p>in the limit, you could have the user tell you by assigning integers :)</p>



<a name="237345706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237345706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237345706">(May 04 2021 at 15:24)</a>:</h4>
<p><code>#[impl_priority = 99]</code> <span aria-label="sparkles" class="emoji emoji-2728" role="img" title="sparkles">:sparkles:</span></p>



<a name="237345858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237345858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237345858">(May 04 2021 at 15:25)</a>:</h4>
<p>ok ok we spent a while on this :)</p>



<a name="237345916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237345916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237345916">(May 04 2021 at 15:26)</a>:</h4>
<p>^^ going to spend some time looking into the remaining <code>marker_trait_attr</code> issues then</p>



<a name="237345961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237345961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237345961">(May 04 2021 at 15:26)</a>:</h4>
<p>so about <a href="https://hackmd.io/VOaGjRYsSXW4PR_VNwQmSQ?edit">https://hackmd.io/VOaGjRYsSXW4PR_VNwQmSQ?edit</a></p>



<a name="237346061"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237346061" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237346061">(May 04 2021 at 15:26)</a>:</h4>
<p>yeah!</p>



<a name="237346065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237346065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237346065">(May 04 2021 at 15:26)</a>:</h4>
<p>I'd like to return to that</p>



<a name="237346088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237346088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237346088">(May 04 2021 at 15:27)</a>:</h4>
<p>i am looking at the notes from the previous meeting <a class="stream-topic" data-stream-id="260443" href="/#narrow/stream/260443-project-const-generics/topic/meeting.202021-04-27">#project-const-generics &gt; meeting 2021-04-27</a></p>



<a name="237346433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237346433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237346433">(May 04 2021 at 15:29)</a>:</h4>
<p>it sounds like the idea of "unsafe" having expanded meaning in <code>const fn</code> is current</p>



<a name="237346466"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237346466" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237346466">(May 04 2021 at 15:29)</a>:</h4>
<p>is it stable?</p>



<a name="237346666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237346666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237346666">(May 04 2021 at 15:30)</a>:</h4>
<p>it does not look like it</p>



<a name="237346688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237346688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237346688">(May 04 2021 at 15:30)</a>:</h4>
<p><a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=6f9680821e2999d5c7ae27573c7c01bc">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=6f9680821e2999d5c7ae27573c7c01bc</a></p>



<a name="237346702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237346702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237346702">(May 04 2021 at 15:30)</a>:</h4>
<p>there were some interesting examples of use cases</p>



<a name="237346961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237346961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237346961">(May 04 2021 at 15:32)</a>:</h4>
<p>I feel like that was part of the next step</p>



<a name="237347113"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237347113" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237347113">(May 04 2021 at 15:33)</a>:</h4>
<ul>
<li>So <span class="user-mention" data-user-id="219696">@XAMPPRocky</span> mentioned a <code>Image</code> type in rust-gpu</li>
</ul>



<a name="237347118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237347118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237347118">(May 04 2021 at 15:33)</a>:</h4>
<p><a href="https://github.com/EmbarkStudios/rust-gpu/blob/1431c18b9db70feafc64e5096a64e5fefffbed18/crates/spirv-std/src/image.rs#L31">https://github.com/EmbarkStudios/rust-gpu/blob/1431c18b9db70feafc64e5096a64e5fefffbed18/crates/spirv-std/src/image.rs#L31</a></p>



<a name="237347213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237347213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237347213">(May 04 2021 at 15:34)</a>:</h4>
<p>(feel free to ping with questions if you have any btw)</p>



<a name="237347312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237347312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237347312">(May 04 2021 at 15:34)</a>:</h4>
<p>I have a questiton right now</p>



<a name="237347319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237347319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237347319">(May 04 2021 at 15:34)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">pub</span><span class="w"> </span><span class="k">use</span><span class="w"> </span><span class="n">spirv_types</span>::<span class="n">image_params</span>::<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">AccessQualifier</span><span class="p">,</span><span class="w"> </span><span class="n">Arrayed</span><span class="p">,</span><span class="w"> </span><span class="n">Dimensionality</span><span class="p">,</span><span class="w"> </span><span class="n">ImageDepth</span><span class="p">,</span><span class="w"> </span><span class="n">ImageFormat</span><span class="p">,</span><span class="w"> </span><span class="n">Multisampled</span><span class="p">,</span><span class="w"> </span><span class="n">Sampled</span><span class="p">,</span><span class="w"></span>
<span class="p">};</span><span class="w"></span>
</code></pre></div>



<a name="237347337"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237347337" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237347337">(May 04 2021 at 15:34)</a>:</h4>
<p>those are ... enums?</p>



<a name="237347347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237347347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237347347">(May 04 2021 at 15:34)</a>:</h4>
<p>random structs?</p>



<a name="237347380"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237347380" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237347380">(May 04 2021 at 15:34)</a>:</h4>
<p><a href="https://github.com/EmbarkStudios/rust-gpu/blob/1431c18b9db70feafc64e5096a64e5fefffbed18/crates/spirv-std/shared/src/image_params.rs">https://github.com/EmbarkStudios/rust-gpu/blob/1431c18b9db70feafc64e5096a64e5fefffbed18/crates/spirv-std/shared/src/image_params.rs</a></p>



<a name="237347477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237347477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237347477">(May 04 2021 at 15:35)</a>:</h4>
<p>They map to these parameters. <a href="https://www.khronos.org/registry/spir-v/specs/unified1/SPIRV.html#OpTypeImage">https://www.khronos.org/registry/spir-v/specs/unified1/SPIRV.html#OpTypeImage</a></p>



<a name="237347696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237347696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237347696">(May 04 2021 at 15:36)</a>:</h4>
<p>it looks like you then have various impls for particular combinations of those parameters</p>



<a name="237347717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237347717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237347717">(May 04 2021 at 15:36)</a>:</h4>
<p>e.g., <a href="https://github.com/EmbarkStudios/rust-gpu/blob/1431c18b9db70feafc64e5096a64e5fefffbed18/crates/spirv-std/src/image.rs#L312-L330">this one</a></p>



<a name="237347755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237347755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237347755">(May 04 2021 at 15:36)</a>:</h4>
<p>do you have a need for doing those operations in a fully generic way, e.g., with traits?</p>



<a name="237347874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237347874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237347874">(May 04 2021 at 15:37)</a>:</h4>
<p>Well I think what's lacking from what we doing currently, is that it's hard to express all the conditions in generics.</p>



<a name="237347933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237347933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237347933">(May 04 2021 at 15:38)</a>:</h4>
<p>example?</p>



<a name="237348042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237348042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237348042">(May 04 2021 at 15:38)</a>:</h4>
<p><a href="https://github.com/EmbarkStudios/rust-gpu/commit/7a6806c17b215df1eb6c87bde16d29292982c7ff">https://github.com/EmbarkStudios/rust-gpu/commit/7a6806c17b215df1eb6c87bde16d29292982c7ff</a></p>



<a name="237348098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237348098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237348098">(May 04 2021 at 15:39)</a>:</h4>
<p><code>OpImageQuerySize</code> for example has this as it's requirements.</p>
<blockquote>
<p>Image must be an object whose type is OpTypeImage. Its Dim operand must be one of those listed under Result Type, above. Additionally, if its Dim is 1D, 2D, 3D, or Cube, it must also have either an MS of 1 or a Sampled of 0 or 2.</p>
</blockquote>



<a name="237348389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237348389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237348389">(May 04 2021 at 15:41)</a>:</h4>
<p>and you would like to express that in a where clause?</p>



<a name="237348554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237348554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237348554">(May 04 2021 at 15:42)</a>:</h4>
<p>does that mean you kind of want <a href="https://github.com/EmbarkStudios/rust-gpu/commit/7a6806c17b215df1eb6c87bde16d29292982c7ff#diff-af86fffcde5057920cf115f8b3cf5614131917b4904aea2ff8689d8247c05a96R1339-R1355">this function to be a <code>const fn</code></a>?</p>



<a name="237348629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237348629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237348629">(May 04 2021 at 15:42)</a>:</h4>
<p>Yeah, as part of the impl block.</p>



<a name="237348669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237348669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237348669">(May 04 2021 at 15:42)</a>:</h4>
<p>I'm going to have to run but I think what I want to do is to have you write out the code you <em>want</em> to write :)</p>



<a name="237348711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237348711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237348711">(May 04 2021 at 15:43)</a>:</h4>
<p>maybe at the <a href="https://hackmd.io/VOaGjRYsSXW4PR_VNwQmSQ?edit">end of this document</a></p>



<a name="237348771"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237348771" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237348771">(May 04 2021 at 15:43)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/260443-project-const-generics/topic/meeting.202021-05-04/near/237348554">said</a>:</p>
<blockquote>
<p>does that mean you kind of want <a href="https://github.com/EmbarkStudios/rust-gpu/commit/7a6806c17b215df1eb6c87bde16d29292982c7ff#diff-af86fffcde5057920cf115f8b3cf5614131917b4904aea2ff8689d8247c05a96R1339-R1355">this function to be a <code>const fn</code></a>?</p>
</blockquote>
<p>I'm not sure I understand, that's in our rustc backend, and I think that code is <code>const fn</code> compatible.</p>



<a name="237348797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237348797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237348797">(May 04 2021 at 15:43)</a>:</h4>
<p>I don't really understand either :)</p>



<a name="237348913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237348913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237348913">(May 04 2021 at 15:44)</a>:</h4>
<p>i do believe that could would be <code>const fn</code> compatible; I am guessing you don't want to wait to enforce that until your backend</p>



<a name="237349003"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237349003" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237349003">(May 04 2021 at 15:45)</a>:</h4>
<p>I mean, yes. Ideally that condition would be expressed as part of the impl block.</p>



<a name="237349087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237349087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237349087">(May 04 2021 at 15:45)</a>:</h4>
<p>I'll write an example <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="237349341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237349341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237349341">(May 04 2021 at 15:46)</a>:</h4>
<p>thanks!</p>



<a name="237349410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237349410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237349410">(May 04 2021 at 15:47)</a>:</h4>
<p>This is an interesting example because it's not really a numeric one; it's more like specializing on configuration</p>



<a name="237349472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237349472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237349472">(May 04 2021 at 15:47)</a>:</h4>
<p>anyway, I have to run, <span class="user-mention" data-user-id="216206">@lcnr</span> I'm going to try and schedule some time to put a bit more effort into sketching this this week I think</p>



<a name="237349603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237349603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237349603">(May 04 2021 at 15:48)</a>:</h4>
<p>what's <em>this</em> here?</p>



<a name="237349645"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237349645" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237349645">(May 04 2021 at 15:48)</a>:</h4>
<p>(vision doc, I meant, but i guess I should carve out time to write-up the specialization stuff we talked about too)</p>



<a name="237349824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237349824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237349824">(May 04 2021 at 15:49)</a>:</h4>
<p>and auto traits, and <code>marker_trait_attr</code>s <span aria-label="rolling on the floor laughing" class="emoji emoji-1f923" role="img" title="rolling on the floor laughing">:rolling_on_the_floor_laughing:</span></p>



<a name="237350541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237350541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237350541">(May 04 2021 at 15:53)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Essentially being able to have the conditions of one parameter be dependent on another. Like in this example. You should only be able to call <code>Foo::foo</code> if <code>Foo&lt;A=0, B=0&gt;</code> or <code>Foo&lt;A={&gt;1}, B={&gt;1}&gt;</code>, but not <code>Foo&lt;A=0, B=1&gt;</code>. </p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">struct</span> <span class="nc">Foo</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">A</span>: <span class="kt">usize</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">B</span>: <span class="kt">usize</span><span class="o">&gt;</span><span class="p">();</span><span class="w"></span>

<span class="k">impl</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">A</span>: <span class="kt">usize</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">B</span>: <span class="kt">usize</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Foo</span><span class="o">&lt;</span><span class="n">A</span><span class="p">,</span><span class="w"> </span><span class="n">B</span><span class="o">&gt;</span><span class="w"></span>
<span class="w">    </span><span class="k">where</span><span class="w"></span>
<span class="w">        </span><span class="k">match</span><span class="w"> </span><span class="n">A</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="mi">0</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">B</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w">          </span><span class="n">_</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">B</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="237351938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237351938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237351938">(May 04 2021 at 16:02)</a>:</h4>
<p>with <code>const_evaluatable_checked</code> that would be</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="cp">#![feature(const_generics, const_evaluatable_checked)]</span><span class="w"></span>

<span class="k">struct</span> <span class="nc">Foo</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">A</span>: <span class="kt">usize</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">B</span>: <span class="kt">usize</span><span class="o">&gt;</span><span class="p">();</span><span class="w"></span>

<span class="k">trait</span><span class="w"> </span><span class="n">IsTrue</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
<span class="k">struct</span> <span class="nc">Condition</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">COND</span>: <span class="kt">bool</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="k">impl</span><span class="w"> </span><span class="n">IsTrue</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Condition</span><span class="o">&lt;</span><span class="kc">true</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>

<span class="c1">// You can also use const params here</span>
<span class="k">const</span><span class="w"> </span><span class="k">fn</span> <span class="nf">condition</span><span class="p">(</span><span class="n">a</span>: <span class="kt">usize</span><span class="p">,</span><span class="w"> </span><span class="n">b</span>: <span class="kt">usize</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kt">bool</span> <span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">match</span><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="mi">0</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w">          </span><span class="n">_</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">impl</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">A</span>: <span class="kt">usize</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">B</span>: <span class="kt">usize</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Foo</span><span class="o">&lt;</span><span class="n">A</span><span class="p">,</span><span class="w"> </span><span class="n">B</span><span class="o">&gt;</span><span class="w"></span>
<span class="w">    </span><span class="k">where</span><span class="w"> </span><span class="n">Condition</span><span class="o">&lt;</span><span class="p">{</span><span class="w"> </span><span class="n">condition</span><span class="p">(</span><span class="n">A</span><span class="p">,</span><span class="w"> </span><span class="n">B</span><span class="p">)</span><span class="w"> </span><span class="p">}</span><span class="o">&gt;</span>: <span class="nc">IsTrue</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">Foo</span>::<span class="o">&lt;</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="o">&gt;</span>::<span class="n">foo</span><span class="p">();</span><span class="w"> </span><span class="c1">// ok</span>
<span class="w">    </span><span class="n">Foo</span>::<span class="o">&lt;</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="o">&gt;</span>::<span class="n">foo</span><span class="p">();</span><span class="w"> </span><span class="c1">// ok</span>
<span class="w">    </span><span class="n">Foo</span>::<span class="o">&lt;</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="o">&gt;</span>::<span class="n">foo</span><span class="p">();</span><span class="w"> </span><span class="c1">// ERR</span>
<span class="w">    </span><span class="n">Foo</span>::<span class="o">&lt;</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="o">&gt;</span>::<span class="n">foo</span><span class="p">();</span><span class="w"> </span><span class="c1">// ERR</span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="237352072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237352072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237352072">(May 04 2021 at 16:02)</a>:</h4>
<p>i still don't recommend using <code>const_evaluatable_checked</code> for anything serious</p>



<a name="237352107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237352107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237352107">(May 04 2021 at 16:03)</a>:</h4>
<p>but this is definitely something I want to support in the future</p>



<a name="237356806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237356806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237356806">(May 04 2021 at 16:29)</a>:</h4>
<p><span class="user-mention silent" data-user-id="216206">lcnr</span> <a href="#narrow/stream/260443-project-const-generics/topic/meeting.202021-05-04/near/237352072">said</a>:</p>
<blockquote>
<p>i still don't recommend using <code>const_evaluatable_checked</code> for anything serious</p>
</blockquote>
<p>What about using in a side project? I'm thinking about spending time implementing PER (Packed Encoding Rules) in <code>rasn</code> using const generics for type constraints.</p>



<a name="237357137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237357137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237357137">(May 04 2021 at 16:31)</a>:</h4>
<p><span class="user-mention silent" data-user-id="216206">lcnr</span> <a href="#narrow/stream/260443-project-const-generics/topic/meeting.202021-05-04/near/237352107">said</a>:</p>
<blockquote>
<p>but this is definitely something I want to support in the future</p>
</blockquote>
<p>That makes me very happy, because that code looks good enough already for what I want. <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="237357206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237357206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237357206">(May 04 2021 at 16:31)</a>:</h4>
<p><span class="user-mention silent" data-user-id="219696">XAMPPRocky</span> <a href="#narrow/stream/260443-project-const-generics/topic/meeting.202021-05-04/near/237356806">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="216206">lcnr</span> <a href="#narrow/stream/260443-project-const-generics/topic/meeting.202021-05-04/near/237352072">said</a>:</p>
<blockquote>
<p>i still don't recommend using <code>const_evaluatable_checked</code> for anything serious</p>
</blockquote>
<p>What about using in a side project? I'm thinking about spending time implementing PER (Packed Encoding Rules) in <code>rasn</code> using const generics for type constraints.</p>
</blockquote>
<p>uuuuuuuuuh~</p>



<a name="237357318"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237357318" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237357318">(May 04 2021 at 16:32)</a>:</h4>
<p>if you're fairly frost resistant it's probably fine <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span> considering that there are a lot of ICE here</p>



<a name="237357373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237357373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237357373">(May 04 2021 at 16:32)</a>:</h4>
<p>also: disable incremental compilation, cause with that it just pretty much ices unconditionally</p>



<a name="237357645"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237357645" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237357645">(May 04 2021 at 16:34)</a>:</h4>
<p><span class="user-mention silent" data-user-id="216206">lcnr</span> <a href="#narrow/stream/260443-project-const-generics/topic/meeting.202021-05-04/near/237357373">said</a>:</p>
<blockquote>
<p>also: disable incremental compilation, cause with that it just pretty much ices unconditionally</p>
</blockquote>
<p>Maybe we should report some of these bugs if they're that deterministic. <span aria-label="rofl" class="emoji emoji-1f923" role="img" title="rofl">:rofl:</span></p>



<a name="237357905"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237357905" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237357905">(May 04 2021 at 16:35)</a>:</h4>
<p><span class="user-mention silent" data-user-id="216206">lcnr</span> <a href="#narrow/stream/260443-project-const-generics/topic/meeting.202021-05-04/near/237357373">said</a>:</p>
<blockquote>
<p>also: disable incremental compilation, cause with that it just pretty much ices unconditionally</p>
</blockquote>
<p>That's fine, <code>rasn</code> is a no_std parser and a bunch of traits, it takes like ~10s to compile. That's instant compared to most of the code I regularly deal with <span aria-label="stuck out tongue" class="emoji emoji-1f61b" role="img" title="stuck out tongue">:stuck_out_tongue:</span></p>



<a name="237360988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237360988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237360988">(May 04 2021 at 16:56)</a>:</h4>
<p>we already have open issues for that</p>



<a name="237361192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237361192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237361192">(May 04 2021 at 16:57)</a>:</h4>
<p>and <span class="user-mention" data-user-id="351972">@Ethan Brierley</span> is working on the solution, but they don't have a lot of time rn so it takes a while for it to be finished</p>



<a name="237361295"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-05-04/near/237361295" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-05-04.html#237361295">(May 04 2021 at 16:58)</a>:</h4>
<p>which is fine, cause <code>const_evaluatable_checked</code> is <em>fundamentally</em> broken in so many other ways that it might actually be a good thing that it frequently breaks :p</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>